package com.lianqi.emcpframework.design.domain.aggregate;

import com.lianqi.emcpframework.design.domain.event.DomainEvent;

/**
 * @program emcp-framework
 * @ClassName AggregateEvent
 * @description: 聚合根事件
 * @author: sky
 * @create: 2019/06/06 11:06
 */
public interface AggregateEvent<ID,T,A extends Aggregate<T,ID>> extends DomainEvent {
    /**
     * 事件源
     * @return
     */
    A source();

    /**
     * 获取事件源
     * @return
     */
    default A getSource(){return source();};
}
